Skip to content

chore: exclude tests from library packaging#193

Open
HenriTEL wants to merge 1 commit intoRunware:mainfrom
HenriTEL:patch-1
Open

chore: exclude tests from library packaging#193
HenriTEL wants to merge 1 commit intoRunware:mainfrom
HenriTEL:patch-1

Conversation

@HenriTEL
Copy link
Copy Markdown

@HenriTEL HenriTEL commented Nov 18, 2025

In addition to a cleaner package, those changes avoid conflicts when users have a tests/ directory with no __init__.py.

In such case python tries to import things in the tests package the sdk provides currently.

In addition to have a cleaner package, those changes avoid conflicts when library users have a `tests/` directory with no `__init__.py`.
In such case python tries to import things in the `tests` package the sdk provides currently.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the packaging configuration so the SDK no longer ships its internal tests package, preventing import conflicts for downstream users who also have a tests/ directory.

Changes:

  • Exclude the tests package from setuptools.find_packages() during distribution builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread setup.py
"Issue tracker": "https://github.com/runware/sdk-python/issues",
},
packages=find_packages(),
packages=find_packages(exclude=("tests",)),
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find_packages(exclude=("tests",)) only excludes the top-level tests package; any subpackages like tests.unit would still be included if added later. Consider excluding both tests and tests.* to ensure the entire tests package tree is never packaged.

Suggested change
packages=find_packages(exclude=("tests",)),
packages=find_packages(exclude=("tests", "tests.*")),

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants